home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / IBPalettes / WW3DKit / WW3DShapeMatrix.m < prev    next >
Encoding:
Text File  |  1995-03-22  |  1.1 KB  |  67 lines

  1. // copyright 1993 Michael B. Johnson; some portions copyright 1994, MIT
  2. // see COPYRIGHT for reuse legalities
  3. //
  4.  
  5.  
  6. #import "WW3DShapeMatrix.h"
  7. #import "WW3DShapeCell.h"
  8. #import "WW3DShapeBrowser.h"
  9.  
  10. #import <3Dkit/N3DShape.h>
  11.  
  12. @implementation WW3DShapeMatrix
  13.  
  14. - initFrame:(const NXRect *)r 
  15. {
  16.   [super initFrame:r];
  17.   browser = nil;
  18.   return self;
  19. }
  20.  
  21. - awake
  22. {
  23.   [super awake];
  24.   browser = nil;
  25.   return self;
  26. }
  27.  
  28.  
  29. - (BOOL)acceptsFirstResponder { return YES; }
  30.  
  31. - cut:sender
  32. {
  33.   id    aCell;
  34.   int   row, col;
  35.  
  36.  
  37.   if (![self cellCount])
  38.   {  return self;
  39.   }
  40.  
  41.   // note: we don't allow multiple selections, so we shouldn't have to
  42.   //       deal with a list of selected cells...
  43.  
  44.   aCell = [self selectedCell];
  45.   [[aCell shape] unlink];
  46.   [self getRow:&row andCol:&col ofCell:aCell];
  47.   [self removeRowAt:row andFree:YES];
  48.   [self sizeToCells];
  49.   if (row) {  row--; }
  50.   [self selectCellAt:row :col];
  51.   // [browser setLastColumn:0];  // why doesn't this work?
  52.  
  53.   [browser display];
  54.   [browser updateShapeCamera];
  55.   
  56.   return self;
  57. }
  58.  
  59.  
  60. - setBrowser:newBrowser
  61. {
  62.   browser = newBrowser;
  63.   return self;
  64. }
  65.  
  66. @end
  67.